//
//  StateRecordCell.m
//  WorkNest
//
//  Created by qbm360 on 15/8/3.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "StateRecordCell.h"

@interface StateRecordCell ()

@property (weak, nonatomic) IBOutlet UIView *headLine;
@property (weak, nonatomic) IBOutlet UIView *circle;
@property (weak, nonatomic) IBOutlet UILabel *content;
@property (weak, nonatomic) IBOutlet UILabel *date;
@property (weak, nonatomic) IBOutlet UIView *bottomLine;

@end

@implementation StateRecordCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(StatusRecordModel *)model {
    _model = model;
    if (!_ifFirst) {
        self.headLine.backgroundColor = [UIUtil colorWithHexString:@"#8b8989"];
        self.bottomLine.backgroundColor = [UIUtil colorWithHexString:@"#8b8989"];
        self.circle.backgroundColor = [UIUtil colorWithHexString:@"#8b8989"];
        self.content.textColor = [UIUtil colorWithHexString:@"#8b8989"];
    } else {
        self.headLine.backgroundColor = [UIUtil colorWithHexString:@"#ff9b2f"];
        self.bottomLine.backgroundColor = [UIUtil colorWithHexString:@"#ff9b2f"];
        self.circle.backgroundColor = [UIUtil colorWithHexString:@"#ff9b2f"];
        self.content.textColor = [UIUtil colorWithHexString:@"#ff9b2f"];
    }
    self.content.text = _model.phase;
    self.date.text = _model.time;
}

@end
